<template>
	<section :is="crtComponent" :staff-id="staffId" @jump-page="fnJumpPage" @go-back="fnGoBack"></section>
</template>

<script>
    import StaffDetail from '../../components/staff/StaffDetail.vue'
    import StaffWorkFlow from '../../components/staff/StaffWorkFlow.vue'
	export default {
		data() {
			return {
				crtComponent : 'staff-detail', //当前组件
				staffId : 0
			}
		},
		components:{
			StaffDetail,StaffWorkFlow
		},
		methods: {
			//自定义方法->组件切换
			fnJumpPage(id,nextComponent){
				var that = this
				that.staffId = id
				that.crtComponent = nextComponent
			},
			//自定义方法->组件返回
			fnGoBack(nextComponent){
				var that = this
				that.crtComponent = nextComponent
			}
		},
		mounted() {
			
		}
	}
</script>

<style scoped>
</style>